// Bring out your Dead - White Wolf character Management System.
// Copyright (C) 2008 Adam Ness
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Boyd.Model;

namespace Boyd.View
{
	/// <summary>
	/// Description of SkillPanel.
	/// </summary>
	public partial class SkillPanel : GroupBox
	{
		private Character character;
		
		public SkillPanel()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		public Character Character {
			get { return character; }
			set { character = value; updateCharacterValues(); }
		}
		
		private void updateCharacterValues() {
			if( Character == null ) {
				inputAcademics.Value = 0;
				inputComputer.Value = 0;
				inputCrafts.Value = 0;
				inputInvestigation.Value = 0;
				inputMedicine.Value = 0;
				inputOccult.Value = 0;
				inputPolitics.Value = 0;
				inputScience.Value = 0;
				inputAthletics.Value = 0;
				inputBrawl.Value = 0;
				inputDrive.Value = 0;
				inputFirearms.Value = 0;
				inputLarceny.Value = 0;
				inputStealth.Value = 0;
				inputSurvival.Value = 0;
				inputWeaponry.Value = 0;
				inputAnimalKen.Value = 0;
				inputEmpathy.Value = 0;
				inputExpression.Value = 0;	
				inputIntimidation.Value = 0;
				inputPersuasion.Value = 0;
				inputSocialize.Value = 0;
				inputStreetwise.Value = 0;
				inputSubterfuge.Value = 0;
			} else {
				inputAcademics.Value = Character.Academics.Rating;
				inputComputer.Value = Character.Computer.Rating;
				inputCrafts.Value = Character.Crafts.Rating;
				inputInvestigation.Value = Character.Investigation.Rating;
				inputMedicine.Value = Character.Medicine.Rating;
				inputOccult.Value = Character.Occult.Rating;
				inputPolitics.Value = Character.Politics.Rating;
				inputScience.Value = Character.Science.Rating;
				inputAthletics.Value = Character.Athletics.Rating;
				inputBrawl.Value = Character.Brawl.Rating;
				inputDrive.Value = Character.Drive.Rating;
				inputFirearms.Value = Character.Firearms.Rating;
				inputLarceny.Value = Character.Larceny.Rating;
				inputStealth.Value = Character.Stealth.Rating;
				inputSurvival.Value = Character.Survival.Rating;
				inputWeaponry.Value = Character.Weaponry.Rating;
				inputAnimalKen.Value = Character.AnimalKen.Rating;
				inputEmpathy.Value = Character.Empathy.Rating;
				inputExpression.Value = Character.Expression.Rating;	
				inputIntimidation.Value = Character.Intimidation.Rating;
				inputPersuasion.Value = Character.Persuasion.Rating;
				inputSocialize.Value = Character.Socialize.Rating;
				inputStreetwise.Value = Character.Streetwise.Rating;
				inputSubterfuge.Value = Character.Subterfuge.Rating;
			}
		}
	}
}
